package com.hitqz.robot.camera.schedule;

import cn.hutool.core.collection.CollUtil;
import com.hitqz.robot.camera.HikVisionService;
import com.hitqz.robot.camera.entity.ConstantsFace;
import lombok.AllArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@AllArgsConstructor
public class HkSchedule {

    private final HikVisionService hikVisionService;

    @Scheduled(fixedRate = 10000L)
    public void retryLogin() {
        //重试登录
        CollUtil.emptyIfNull(ConstantsFace.HK_LOGIN_FAIL_LIST).removeIf(hikVisionService::login);
    }




}
